import cn.wolfcode.crm.domain.Department;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.service.IEmployeeService;
import lombok.Setter;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class App {
    @Setter
    private IEmployeeService employeeService;
    @Test
    public void testSave(){
        Employee employee = new Employee();
        employee.setAdmin(true);
        employee.setEmail("test@qq.com");
        employee.setHiredate(new Date());
        employee.setPassword("123");
        employee.setRealname("xiaobang");
        employee.setState(true);
        employee.setUsername("lin");
        employee.setTel("10000000000");
        employeeService.saveOrUpdate(employee);
    }
}
